package com.youths.dao;

import com.youths.domain.Slice;
import com.youths.domain.YouthInfo;
import org.apache.ibatis.annotations.Param;
import org.springframework.web.bind.annotation.PostMapping;

import javax.xml.crypto.Data;
import java.util.Date;
import java.util.List;

/**
 * Created by IntelliJ IDEA.
 * User: KingRainGrey
 * Date: 2020/6/28
 */
public interface SliceMapper {
    //add
    int add(@Param("boneDicomPath") String boneDicomPath,
            @Param("boneImgPath") String boneImgPath,
            @Param("httpPath") String httpPath,
            @Param("height") Float height,
            @Param("weight") Float weight,
            @Param("physicalTime") Date physicalTime,
            @Param("youthId") Integer youthId,
            @Param("state") Integer state);

    int save(@Param("boneDicomPath") String boneDicomPath,
             @Param("boneImgPath") String boneImgPath,
             @Param("httpPath") String httpPath,
             @Param("physicalTime") Date physicalTime,
             @Param("state") Integer state);

    int save(Slice slice);

    //update
    int updateInfo(@Param("height") Float height,
                   @Param("weight") Float weight,
                   @Param("slicingPath") String slicingPath,
                   @Param("youthId") Integer youthId,
                   @Param("slicingId") Integer slicingId,
                   @Param("state") Integer state);

    int updatePath(@Param("slicingPath") String slicingPath,
                   @Param("slicingId") Integer slicingId,
                   @Param("state") Integer state);


    int updateTask(@Param("taskId") Integer taskId,
                   @Param("slicingId") Integer slicingId,
                   @Param("state") Integer state);

    int updateState(@Param("slicingId") Integer slicingId,
                    @Param("state") Integer state);

    int updateTime(Integer slicingId, Date physicalTime);


    //query
    Slice query(@Param("slicingId") Integer slicingId);

    List<Slice> list(@Param("youthId") Integer youthId);

    List<Slice> getList(@Param("slicingId") Integer slicingId,
                        @Param("date1") String date1,
                        @Param("date2") String date2,
                        @Param("youthInfos") List<YouthInfo> youthInfos);
}
